<template>
    <div id="app">
        <!-- 表头部默认隐藏 -->
        <!-- <Xheader ref="xheader" style="display:none;"></Xheader> -->
        <keep-alive include="home">
            <router-view/>
        </keep-alive>
    </div>
</template>

<script>
import { shareIndex } from 'methods/baseinfo.js';
export default {
    name: "app",
    data() {
        return {
            shopShow: true
        };
    },
    computed: {
        imgUrl() {
            return this.$store.a.state;
        }
    },
    watch: {
        $route(to, from) {
            if (to.path == "/") {
                this.$store.commit("increment", '壹商城');
            } else if (to.path == "/categoryDetail") {
                this.$store.commit('increment','商品详情');
            } else if (to.path == "/category") {
                this.$store.commit("increment", "全部产品");
            } else if (to.path == "/Myorder") {
                this.$store.commit("increment", "我的订单");
            } else if (to.path == "/IntergralResults") {
                this.$store.commit("increment", "兑换结果");
            } else if (to.path == "/goodsResult") {
                this.$store.commit("increment", "确认订单");
            } else if (to.path == "/hkbPayfrom") {
                this.$store.commit("increment", "汇卡宝支付");
            } else if (to.path == "/AddressManage") {
                this.$store.commit("increment", "地址管理");
            }else if(to.path == '/addressMangeSet'){
                this.$store.commit("increment", "管理地址");
            } else if (to.path == "/Address") {
                this.$store.commit("increment", "添加新地址");
            } else if (to.path == "/Addresseditor") {
                this.$store.commit("increment", "编辑地址");
            } else if (to.path == "/payMoneyEnd") {
                this.$store.commit("increment", "购买结果");
            } else if (to.path == "/orderIntergraDetail") {
                this.$store.commit("increment", "订单详情");
            } else if (to.path == "/orderMoneyDetail") {
                this.$store.commit("increment", "订单详情");
            } else if (to.path == "/Myvouchers") {
                this.$store.commit("increment", "我的卡券");
            } else if (to.path == "/shopcart") {
                this.$store.commit("increment", "购物车");
            } else if (to.path == "/shopResult") {
                this.$store.commit("increment", "确认订单");
            } else if (to.path == "/BatchApplication") {
                this.$store.commit("increment", "批量购券");
            } else if (to.path == "/VoucherShow") {
                this.$store.commit("increment", "优惠券分享");
            } else if (to.path == "/ApplicationAudit") {
                this.$store.commit("increment", "申请列表");
            } else if (to.path == "/couponApplyDetail") {
                this.$store.commit("increment", "批量申请编辑");
            } else if (to.path == "/application") {
                this.$store.commit("increment", "批量申请");
            } else if (to.path == "/personalCenter") {
                this.$store.commit("increment", "个人中心");
            } else if (to.path == "/wallet") {
                this.$store.commit("increment", "钱包");
            } else if (to.path == "/classification") {
                this.$store.commit("increment", "分类");
            } else if (to.path == "/userSetting") {
                this.$store.commit("increment", "设置");
            } else if (to.path == "/drawCash") {
                this.$store.commit("increment", "提现");
            } else if (to.path == "/CashSucc") {
                this.$store.commit("increment", "成功");
            } else if (to.path == "/Putforward") {
                
            }
        }
    },
    created(){
        //初始化默认分享首页
        shareIndex();
    }
};
</script>

<style lang='less'>
@import "~vux/src/styles/1px.less";
@import "./components/css/index.less";
#app {
    font-family: PingFangSC-Regular, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #000000;
    margin: 0;
}
.mint-msgbox {
    width: 65%;
    border-radius: 7px;
}
.mint-msgbox-message {
    color: #000000 !important;
}
.mint-msgbox-btn {
    font-size: 16px;
}
.mint-msgbox-cancel {
    color: #c8c8c8 !important;
}
.vux-header .vux-header-left .left-arrow:before {
    top: 5px !important;
    width: 13px !important;
    height: 13px !important;
    border: 1px solid #fff !important;
    border-width: 2px 0 0 2px !important;
}
.shopcart {
    width: 36px;
    height: 36px;
    position: fixed;
    top: 5px;
    right: 60px;
    z-index: 11111;
}
</style>
